<%@page contentType="text/html" pageEncoding="iso-8859-1"%>
<?xml version="1.0" encoding="ISO-8859-1"?>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="layout" uri="/WEB-INF/tlds/layout.tld" %>

<c:import var="menuAdmin" url="/menuAdmin.jsp"/>
<jsp:useBean id="resultadoBusca" scope="request" class="java.util.Vector"/>
<jsp:useBean id="avaliador" scope="session" class="avaliacao.DTO.DTOAvaliador"/>

<c:set var="grupo" scope="page">
    <jsp:getProperty name="avaliador" property="grupo"/>
</c:set>

<layout:head>
    <%-- Insert extra scripts and styles here --%>
</layout:head>

<layout:body>
    <c:choose>
        <c:when test="${grupo == 'admin'}" >
            ${menuAdmin}

            <div id="main">
                <h1>Lista de Avaliadores</h1>
                <div style="height:120px;width:500px;overflow:auto;border:1px solid black;">
                    <table align="center">
                    <th width="300" align="left">
                        Avaliador
                    </th>
                    <th width="200" align="left">
                        Editar
                    </th>
                    <th width="200" align="left">
                        Remover
                    </th>
                    <c:forEach items="${resultadoBusca}" var="avaliadorItem">
                        <tr>
                            <td align="left">
                                <c:out value="${avaliadorItem.nome}"/>
                            </td>
                            <td align="left">
                                <A HREF="Controller?pageHandler=BuscaAvaliador&id=${avaliadorItem.ID}" >
                                    <img src="img/Edit.gif" border="0" alt=""/>
                                </A>
                            </td>
                            <td align="left">
                                <A HREF="" >
                                    <img src="img/Delete.gif" border="0" alt=""/>
                                </A>
                            </td>
                        </tr>
                    </c:forEach>
                </table>
                </div>
            </div>

        </c:when>
        <c:otherwise>
            Voc&ecirc; n&atilde;o tem permiss&atilde;o para acessar esta p&aacute;gina.
        </c:otherwise>
    </c:choose>
</layout:body>